home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 13 - 1997 (partial) / 13.04 Apr 97 / OpenDocExtentions / SelectSOM / OutputFiles / GetNameExt.xh < prev    next >
Encoding:
Text File  |  1996-06-20  |  3.6 KB  |  166 lines  |  [TEXT/MPS ]

  1.  
  2. /*
  3.  * This file was generated by the SOM Compiler.
  4.  * FileName: GetNameExt.xh.
  5.  * Generated using:
  6.  *     SOM Precompiler somipc: 2.18
  7.  *     SOM Emitter emitxh.dll: 2.33
  8.  */
  9.  
  10. #ifndef SOM_Module_KSS_defined
  11. #define SOM_Module_KSS_defined 1
  12. #include <som.xh>
  13.  
  14. /*
  15.  * Start of user-defined types:
  16.  */
  17. class SOMClass;
  18. class SOMObject;
  19. class ODFrame;
  20. class ODFacet;
  21. class ODObject;
  22. class ODExtension;
  23. class ODRefCntObject;
  24. class ODPart;
  25. class KSS_SelectPart;
  26. #define kGetNameExtension "Apple Computer:Extension:ScriptPalette"
  27.  
  28. /*
  29.  * End of user-defined types.
  30.  */
  31. #endif /* SOM_Module_KSS_defined */
  32.  
  33. #ifndef SOM_KSS_GetNameExt_xh
  34. #define SOM_KSS_GetNameExt_xh
  35.  
  36. class KSS_GetNameExt;
  37.  
  38. #define KSS_GetNameExt_MajorVersion 1
  39. #define KSS_GetNameExt_MinorVersion 1
  40.  
  41. /*
  42.  * Passthru lines: File: "C.xh", "before"
  43.  */
  44. class KSS_SelectPart;
  45.  
  46. /* C++ SOM defs */
  47. #include <somcls.xh>
  48. #include <somcm.xh>
  49.  
  50. /* C++ parent defs */
  51. #ifndef SOM_ODExtension_xh
  52. #include <Extensn.xh>
  53. #endif
  54.  
  55. #ifndef KSS_GetNameExt_API
  56. #define KSS_GetNameExt_API
  57. /*
  58.  * -- The Class API
  59.  */
  60.  
  61. /*
  62.  * Start of user-defined types:
  63.  */
  64.  
  65. /*
  66.  * End of user-defined types.
  67.  */
  68.  
  69. #ifdef OLDIBMSOMAPISUPPORT
  70. #define KSS_GetNameExtCClassData KSS_GetNameExtClassData
  71. #define KSS_GetNameExtNewClass(major,minor) somNewVersionedClassReference(KSS_GetNameExt,major,minor)
  72. #endif
  73.  
  74. /* define xxxMetaClass macro to facilitate (cls ## MetaClass) */
  75. #define KSS_GetNameExtMetaClass SOMClass
  76.  
  77. #if PRAGMA_ALIGN_SUPPORTED
  78. #  pragma options align=power
  79. #endif
  80.  
  81. /* The API to the KSS_GetNameExt class object, and the methods it introduces. */
  82. SOMEXTERN struct KSS_GetNameExtClassDataStructure {
  83. #ifdef OLDIBMSOMAPISUPPORT
  84.     SOMClass            *classObject;    /* always zero, use somNewClassReference instead */
  85. #else
  86.     long zero;
  87. #endif
  88.     somStaticClassInfo *sci;
  89.     somDToken        instanceDataToken;
  90.     long reserved [3];
  91.     somMToken GetName;
  92. } SOMDLINK KSS_GetNameExtClassData;
  93.  
  94. #if PRAGMA_ALIGN_SUPPORTED
  95. #  pragma options align=reset
  96. #endif
  97.  
  98. #if !defined(KSS_GetNameExt_Class_Source) && !defined(SOM_Module_getnameext_Source)
  99. #if PRAGMA_IMPORT_SUPPORTED
  100. #pragma import list KSS_GetNameExtClassData
  101. #endif
  102. #endif
  103.  
  104.  
  105. /*
  106.  * -- Typedefs and inline method declarations for left path inherited methods
  107.  * -- are omitted because this compilation had -museinheritedmethods in effect
  108.  */
  109.  
  110.  
  111. /*
  112.  * -- Typedefs for KSS_GetNameExt Method Procedures
  113.  */
  114. SOMEXTERN {
  115. typedef void   (* SOMLINK somTD_KSS_GetNameExt_GetName)(KSS_GetNameExt *somSelf, Environment *ev);
  116. }
  117.  
  118. #endif /* KSS_GetNameExt_API */
  119.  
  120.  
  121. /*
  122.  * -- This emitter treats Method Tokens as Thunks by default.
  123.  * -- Use the sc modifier "nothunks" to change this default
  124.  */
  125. #undef somresolve_
  126. #define somresolve_(obj,mToken) ((somMethodProc*)((void)obj, mToken))
  127.  
  128. /*
  129.  * -- The C++ Wrapper Class for KSS_GetNameExt
  130.  */
  131. class KSS_GetNameExt : public ODExtension
  132. {
  133. public:
  134.  
  135. // KSS_GetNameExt::new registers use of the class object, and then uses somNew
  136. // to allocate memory and load the object method table pointer. 
  137. void *operator new(size_t size)
  138. {
  139.     SOM_IgnoreWarning(size);
  140.     // Allocate memory using the default allocator for KSS_GetNameExt, and
  141.     // clear mem & set method table pointer, call basic initialization
  142.     return (void*) somNewObject(KSS_GetNameExt);
  143. }
  144.  
  145. // KSS_GetNameExt::delete uses the default deallocator for the object's class.
  146. void operator delete(void * obj)
  147. {
  148.     if (obj) {
  149.         SOM_Resolve(obj,SOMObject,somFree)
  150.            ( (SOMObject*) obj );
  151.     }
  152. }
  153.  
  154. /* method: GetName */
  155. void   GetName(Environment *ev)
  156. {
  157.    SOM_ResolveD(this,KSS_GetNameExt,KSS_GetNameExt,GetName)
  158.     (this,ev);
  159. }
  160.  
  161. };   /* KSS_GetNameExt */
  162.  
  163.  
  164.  
  165. #endif       /* SOM_KSS_GetNameExt_xh */
  166.